<html>
<meta http-equiv="Content-type"content="text/html;charset=utf-8"/>
<style type="text/css">
#btn_find
{
-webkit-border-radius:4px;
-webkit-box-shadow: 0 1px 0px 1px #8B795E;
background: -webkit-linear-gradient(#836FFF, #7A67EE);
border : 0px;
color: white;
}
#btn_find:hover
{
background: -webkit-linear-gradient(#7A67EE, #6959CD);
}
</style>
<body>
<?php
if(isset($_POST["chuoi1"]) && isset($_POST["chuoi2"]))
{
$chuoi1 = $_POST["chuoi1"];
$chuoi2 = $_POST["chuoi2"];
$temp = strcasecmp($chuoi1, $chuoi2);
if($temp == 0)
{
	$ketqua = "2 chuỗi bằng nhau !";
}
else if($temp > 0)
{
	$ketqua = "chuỗi 1 dài hơn chuỗi 2 !";
}
else
	$ketqua = "chuỗi 2 dài hơn chuỗi 1 !";
	
}
?>
<form id="form1"name="form1"method="post"action="SoSanhChuoi.php">
<table align="center"style="background-color:#FFFACD;"border="1px">
<tr>
<td style="background-color:#CDC9A5;"colspan="2"align="center">TÌM TỪ TRONG CHUỖI</td>
</tr>
<tr>
<td>chuỗi thứ nhất</td>
<td><label><input id="chuoi1"name="chuoi1"type="text"value="<?php
	if(isset($_POST["chuoi1"]))
	{
		echo $_POST["chuoi1"];
	}
?>"/></label></td>
</tr>
<tr>
<td>chuỗi thứ hai</td>
<td><label><input id="chuoi2"name="chuoi2"type="text"value="<?php
	if(isset($_POST["chuoi2"]))
	{
		echo $_POST["chuoi2"];
	}
?>"/></label></td>
</tr>
<tr>
<td colspan="2"align="center"><label><input id="btn_find"name="btn_find"type="submit"value="So Sánh"align="center"/></label></td>
</tr>
<tr>
<td colspan="2"><label><input style="width:236px;"id="ketqua"name="ketqua"type="text"value="<?php
if(isset($_POST["ketqua"])){echo $ketqua;}
?>"/></label></td>
</tr>
</table>
</form>



</body>
</html>